package com.avengers.common.bean.enums;


/**
 * @author yu.wang
 * @since 2019-08-01 18:34
 **/
public enum AuctionQueueType {
    /**
     * 发起竞价
     */
    ironManStart(1),
    avengersStart(6),
    /**
     * 支付
     */
    ironManPay(2),
    avengersPay(7),
    /**
     * 交割
     */
    ironManDeliver(3),
    avengersDeliver(8),
    /**
     * 外部预订
     */
    externalReserve(9),
    /**
     * 落后提醒
     */
    behindNotify(10),
    /**
     * 管理员外部预订
     */
    externalReserveAdmin(11);

    public final Integer value;


    AuctionQueueType(Integer value) {
        this.value = value;
    }

    public static AuctionQueueType of(Integer value) {
        if (null != value) {
            for (AuctionQueueType queueType : values()) {
                if (queueType.value.equals(value)) {
                    return queueType;
                }
            }
        }
        return null;
    }

    public static AuctionQueueType of(String value) {
        try {
            Integer iValue = Integer.valueOf(value);
            return of(iValue);
        } catch (Exception ignore) {
        }
        return null;
    }
}
